package com.ruoyi.manage.service;

import java.util.List;
import java.util.Map;
import com.ruoyi.manage.domain.CrRecruitment;

/**
 * 社团招聘Service接口
 * 
 * @author ruoyi
 * @date 2024-09-24
 */
public interface ICrRecruitmentService 
{
    /**
     * 查询社团招聘
     * 
     * @param recruitmentId 社团招聘主键
     * @return 社团招聘
     */
    public CrRecruitment selectCrRecruitmentByRecruitmentId(Long recruitmentId);

    /**
     * 查询社团招聘列表
     * 
     * @param crRecruitment 社团招聘
     * @return 社团招聘集合
     */
    public List<CrRecruitment> selectCrRecruitmentList(CrRecruitment crRecruitment);

    /**
     * 新增社团招聘
     * 
     * @param crRecruitment 社团招聘
     * @return 结果
     */
    public int insertCrRecruitment(CrRecruitment crRecruitment);

    /**
     * 修改社团招聘
     * 
     * @param crRecruitment 社团招聘
     * @return 结果
     */
    public int updateCrRecruitment(CrRecruitment crRecruitment);

    /**
     * 批量删除社团招聘
     * 
     * @param recruitmentIds 需要删除的社团招聘主键集合
     * @return 结果
     */
    public int deleteCrRecruitmentByRecruitmentIds(Long[] recruitmentIds);

    /**
     * 删除社团招聘信息
     * 
     * @param recruitmentId 社团招聘主键
     * @return 结果
     */
    public int deleteCrRecruitmentByRecruitmentId(Long recruitmentId);

    /**
     * 根据社团ID查询招聘列表
     * 
     * @param clubId 社团ID
     * @return 招聘列表
     */
    public List<CrRecruitment> selectRecruitmentsByClubId(Long clubId);

    /**
     * 根据状态查询招聘列表
     * 
     * @param status 招聘状态
     * @return 招聘列表
     */
    public List<CrRecruitment> selectRecruitmentsByStatus(String status);

    /**
     * 搜索招聘信息
     * 
     * @param keyword 关键词
     * @param clubType 社团类型
     * @param status 招聘状态
     * @return 招聘列表
     */
    public List<CrRecruitment> searchRecruitments(String keyword, String clubType, String status);

    /**
     * 发布招聘信息
     * 
     * @param crRecruitment 招聘信息
     * @return 结果
     */
    public int publishRecruitment(CrRecruitment crRecruitment);

    /**
     * 关闭招聘
     * 
     * @param recruitmentId 招聘ID
     * @param clubId 社团ID
     * @return 结果
     */
    public int closeRecruitment(Long recruitmentId, Long clubId);

    /**
     * 重新开放招聘
     * 
     * @param recruitmentId 招聘ID
     * @param clubId 社团ID
     * @return 结果
     */
    public int reopenRecruitment(Long recruitmentId, Long clubId);

    /**
     * 增加浏览量
     * 
     * @param recruitmentId 招聘ID
     * @return 结果
     */
    public int increaseViewCount(Long recruitmentId);

    /**
     * 获取热门招聘（根据浏览量和申请数量）
     * 
     * @param limit 数量限制
     * @return 招聘列表
     */
    public List<CrRecruitment> getPopularRecruitments(int limit);

    /**
     * 获取最新招聘
     * 
     * @param limit 数量限制
     * @return 招聘列表
     */
    public List<CrRecruitment> getLatestRecruitments(int limit);

    /**
     * 获取即将截止的招聘
     * 
     * @param days 天数（几天内截止）
     * @return 招聘列表
     */
    public List<CrRecruitment> getExpiringRecruitments(int days);

    /**
     * 获取社团招聘统计
     * 
     * @param clubId 社团ID
     * @return 统计信息
     */
    public Map<String, Object> getClubRecruitmentStatistics(Long clubId);

    /**
     * 获取招聘统计信息
     * 
     * @param recruitmentId 招聘ID
     * @return 统计信息
     */
    public Map<String, Object> getRecruitmentStatistics(Long recruitmentId);

    /**
     * 检查招聘是否可申请
     * 
     * @param recruitmentId 招聘ID
     * @return 是否可申请
     */
    public boolean isRecruitmentAvailable(Long recruitmentId);

    /**
     * 获取推荐招聘（基于学生兴趣和技能）
     * 
     * @param studentId 学生ID
     * @param limit 数量限制
     * @return 招聘列表
     */
    public List<CrRecruitment> getRecommendedRecruitments(Long studentId, int limit);

    /**
     * 更新招聘申请统计
     * 
     * @param recruitmentId 招聘ID
     * @return 结果
     */
    public int updateRecruitmentApplicationStats(Long recruitmentId);

    /**
     * 批量更新招聘状态
     * 
     * @param recruitmentIds 招聘ID数组
     * @param status 新状态
     * @return 结果
     */
    public int batchUpdateRecruitmentStatus(Long[] recruitmentIds, String status);

    /**
     * 导出招聘数据
     * 
     * @param crRecruitment 查询条件
     * @return 招聘列表
     */
    public List<CrRecruitment> exportRecruitments(CrRecruitment crRecruitment);
}